home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_xemacs.idb / usr / freeware / lib / xemacs-20.4 / lisp / vm / vm-startup.el.z / vm-startup.el
Encoding:
Text File  |  1998-05-21  |  39.3 KB  |  1,158 lines

  1. ;;; Entry points for VM
  2. ;;; Copyright (C) 1994-1998 Kyle E. Jones
  3. ;;;
  4. ;;; This program is free software; you can redistribute it and/or modify
  5. ;;; it under the terms of the GNU General Public License as published by
  6. ;;; the Free Software Foundation; either version 1, or (at your option)
  7. ;;; any later version.
  8. ;;;
  9. ;;; This program is distributed in the hope that it will be useful,
  10. ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  12. ;;; GNU General Public License for more details.
  13. ;;;
  14. ;;; You should have received a copy of the GNU General Public License
  15. ;;; along with this program; if not, write to the Free Software
  16. ;;; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  17.  
  18. (provide 'vm-startup)
  19.  
  20. ;;;###autoload
  21. (defun vm (&optional folder read-only)
  22.   "Read mail under Emacs.
  23. Optional first arg FOLDER specifies the folder to visit.  It defaults
  24. to the value of vm-primary-inbox.  The folder buffer is put into VM
  25. mode, a major mode for reading mail.
  26.  
  27. Prefix arg or optional second arg READ-ONLY non-nil indicates
  28. that the folder should be considered read only.  No attribute
  29. changes, message additions or deletions will be allowed in the
  30. visited folder.
  31.  
  32. Visiting the primary inbox causes any contents of the system mailbox to
  33. be moved and appended to the resulting buffer.
  34.  
  35. All the messages can be read by repeatedly pressing SPC.  Use `n'ext and
  36. `p'revious to move about in the folder.  Messages are marked for
  37. deletion with `d', and saved to another folder with `s'.  Quitting VM
  38. with `q' expunges deleted messages and saves the buffered folder to
  39. disk.
  40.  
  41. See the documentation for vm-mode for more information."
  42.   (interactive (list nil current-prefix-arg))
  43.   (vm-session-initialization)
  44.   ;; set inhibit-local-variables non-nil to protect
  45.   ;; against letter bombs.
  46.   ;; set enable-local-variables to nil for newer Emacses
  47.   (catch 'done
  48.     (let ((full-startup (not (bufferp folder)))
  49.       (did-read-index-file nil)
  50.       folder-buffer first-time totals-blurb
  51.       preserve-auto-save-file)
  52.       (setq folder-buffer
  53.         (if (bufferp folder)
  54.         folder
  55.           (let ((file (or folder (expand-file-name vm-primary-inbox
  56.                                vm-folder-directory))))
  57.         (if (file-directory-p file)
  58.             ;; MH code perhaps... ?
  59.             (error "%s is a directory" file)
  60.           (or (vm-get-file-buffer file)
  61.               (let ((default-directory
  62.                   (or (and vm-folder-directory
  63.                        (expand-file-name vm-folder-directory))
  64.                   default-directory))
  65.                 (inhibit-local-variables t)
  66.                 (enable-local-variables nil)
  67.                 ;; for XEmacs/Mule
  68.                 (coding-system-for-read 'no-conversion))
  69.             (message "Reading %s..." file)
  70.             (prog1 (find-file-noselect file)
  71.               ;; update folder history
  72.               (let ((item (or folder vm-primary-inbox)))
  73.                 (if (not (equal item (car vm-folder-history)))
  74.                 (setq vm-folder-history
  75.                       (cons item vm-folder-history))))
  76.               (message "Reading %s... done" file))))))))
  77.       (set-buffer folder-buffer)
  78.       ;; for XEmacs/MULE
  79.       ;;
  80.       ;; If the file coding system is not a no-conversion variant,
  81.       ;; make it so by encoding all the text, then setting
  82.       ;; the file coding system and decoding it.
  83.       ;; This is only possible if a file is visited and then vm-mode
  84.       ;; is run on it afterwards.
  85.       (defvar buffer-file-coding-system)
  86.       (if (and vm-xemacs-mule-p
  87.            (not (eq (get-coding-system buffer-file-coding-system)
  88.             (get-coding-system 'no-conversion-unix)))
  89.            (not (eq (get-coding-system buffer-file-coding-system)
  90.             (get-coding-system 'no-conversion-dos)))
  91.            (not (eq (get-coding-system buffer-file-coding-system)
  92.             (get-coding-system 'no-conversion-mac)))
  93.            (not (eq (get-coding-system buffer-file-coding-system)
  94.             (get-coding-system 'binary))))
  95.       (let ((buffer-read-only nil)
  96.         (omodified (buffer-modified-p)))
  97.         (unwind-protect
  98.         (progn
  99.           (encode-coding-region (point-min) (point-max)
  100.                     buffer-file-coding-system)
  101.           (set-buffer-file-coding-system 'no-conversion nil)
  102.           (decode-coding-region (point-min) (point-max)
  103.                     buffer-file-coding-system))
  104.           (set-buffer-modified-p omodified))))
  105.       (vm-check-for-killed-summary)
  106.       (vm-check-for-killed-presentation)
  107.       ;; If the buffer's not modified then we know that there can be no
  108.       ;; messages in the folder that are not on disk.
  109.       (or (buffer-modified-p) (setq vm-messages-not-on-disk 0))
  110.       (setq first-time (not (eq major-mode 'vm-mode))
  111.         preserve-auto-save-file (and buffer-file-name
  112.                       (not (buffer-modified-p))
  113.                       (file-newer-than-file-p
  114.                        (make-auto-save-file-name)
  115.                        buffer-file-name)))
  116.       ;; Force the folder to be read only if the auto
  117.       ;; save file contains information the user might not
  118.       ;; want overwritten, i.e. recover-file might be
  119.       ;; desired.  What we want to avoid is an auto-save.
  120.       ;; Making the folder read only will keep
  121.       ;; subsequent actions from modifying the buffer in a
  122.       ;; way that triggers an auto save.
  123.       ;;
  124.       ;; Also force the folder read-only if it was read only and
  125.       ;; not already in vm-mode, since there's probably a good
  126.       ;; reason for this.
  127.       (setq vm-folder-read-only (or preserve-auto-save-file read-only
  128.                     (default-value 'vm-folder-read-only)
  129.                     (and first-time buffer-read-only)))
  130.       ;; If this is not a VM mode buffer then some initialization
  131.       ;; needs to be done 
  132.       (if first-time
  133.       (progn
  134.         (buffer-disable-undo (current-buffer))
  135.         (abbrev-mode 0)
  136.         (auto-fill-mode 0)
  137.         (vm-mode-internal)
  138.         ;; If the buffer is modified we don't know if the
  139.         ;; folder format has been changed to be different
  140.         ;; from index file, so don't read the index file in
  141.         ;; that case.
  142.         (if (not (buffer-modified-p))
  143.         (setq did-read-index-file (vm-read-index-file-maybe)))))
  144.  
  145.       (vm-assimilate-new-messages nil (not did-read-index-file) nil)
  146.  
  147.       (if (and first-time (not did-read-index-file))
  148.       (progn
  149.         (vm-gobble-visible-header-variables)
  150.         (vm-gobble-bookmark)
  151.         (vm-gobble-pop-retrieved)
  152.         (vm-gobble-summary)
  153.         (vm-gobble-labels)))
  154.  
  155.       (if first-time
  156.       (vm-start-itimers-if-needed))
  157.  
  158.       ;; make a new frame if the user wants one.  reuse an
  159.       ;; existing frame that is showing this folder.
  160.       (if (and full-startup
  161.            ;; this so that "emacs -f vm" doesn't create a frame.
  162.            this-command)
  163.       (apply 'vm-goto-new-folder-frame-maybe
  164.          (if folder '(folder) '(primary-folder folder))))
  165.  
  166.       ;; raise frame if requested and apply startup window
  167.       ;; configuration.
  168.       (if full-startup
  169.       (let ((buffer-to-display (or vm-summary-buffer
  170.                        vm-presentation-buffer
  171.                        (current-buffer))))
  172.         (vm-display buffer-to-display buffer-to-display
  173.             (list this-command)
  174.             (list (or this-command 'vm) 'startup))
  175.         (if vm-raise-frame-at-startup
  176.         (vm-raise-frame))))
  177.  
  178.       ;; say this NOW, before the non-previewers read a message,
  179.       ;; alter the new message count and confuse themselves.
  180.       (if full-startup
  181.       ;; save blurb so we can repeat it later as necessary.
  182.       (setq totals-blurb (vm-emit-totals-blurb)))
  183.  
  184.       (vm-thoughtfully-select-message)
  185.       (vm-update-summary-and-mode-line)
  186.       ;; need to do this after any frame creation because the
  187.       ;; toolbar sets frame-specific height and width specifiers.
  188.       (and (vm-toolbar-support-possible-p) vm-use-toolbar
  189.        (progn
  190.          (message "Initializing toolbar...")
  191.          (vm-toolbar-install-toolbar)
  192.          (message "Initializing toolbar... done")
  193.          (vm-toolbar-update-toolbar)))
  194.  
  195.       (and vm-use-menus (vm-menu-support-possible-p)
  196.        (vm-menu-install-visited-folders-menu))
  197.  
  198.       (if full-startup
  199.       (progn
  200.         (if (and (vm-should-generate-summary)
  201.              ;; don't generate a summary if recover-file is
  202.              ;; likely to happen, since recover-file does
  203.              ;; nothing useful in a summary buffer.
  204.              (not preserve-auto-save-file))
  205.         (vm-summarize t nil))
  206.         ;; raise the summary frame if the user wants frames
  207.         ;; raised and if there is a summary frame.
  208.         (if (and vm-summary-buffer
  209.              vm-mutable-frames
  210.              vm-frame-per-summary
  211.              vm-raise-frame-at-startup)
  212.         (vm-raise-frame))
  213.         ;; if vm-mutable-windows is nil, the startup
  214.         ;; configuration can't be applied, so do
  215.         ;; something to get a VM buffer on the screen
  216.         (if vm-mutable-windows
  217.         (vm-display nil nil (list this-command)
  218.                 (list (or this-command 'vm) 'startup))
  219.           (save-excursion
  220.         (switch-to-buffer (or vm-summary-buffer
  221.                       vm-presentation-buffer
  222.                       (current-buffer)))))))
  223.  
  224.       (if vm-message-list
  225.       (vm-preview-current-message))
  226.  
  227.       (run-hooks 'vm-visit-folder-hook)
  228.  
  229.       (if full-startup
  230.       (message totals-blurb))
  231.       ;; Warn user about auto save file, if appropriate.
  232.       (if (and full-startup preserve-auto-save-file)
  233.       (message 
  234.        (substitute-command-keys
  235.         "Auto save file is newer; consider \\[recover-file].  FOLDER IS READ ONLY.")))
  236.       ;; if we're not doing a full startup or if doing more would
  237.       ;; trash the auto save file that we need to preserve,
  238.       ;; stop here.
  239.       (if (or (not full-startup) preserve-auto-save-file)
  240.       (throw 'done t))
  241.       (if (and vm-auto-get-new-mail
  242.            (not vm-block-new-mail)
  243.            (not vm-folder-read-only))
  244.       (progn
  245.         (message "Checking for new mail for %s..."
  246.                 (or buffer-file-name (buffer-name)))
  247.         (if (and (vm-get-spooled-mail t) (vm-assimilate-new-messages t))
  248.         (progn
  249.           (setq totals-blurb (vm-emit-totals-blurb))
  250.           (if (vm-thoughtfully-select-message)
  251.               (vm-preview-current-message)
  252.             (vm-update-summary-and-mode-line))))
  253.         (message totals-blurb)))
  254.  
  255.       ;; Display copyright and copying info unless
  256.       ;; user says no.
  257.       (if (and (interactive-p) (not vm-startup-message-displayed))
  258.       (progn
  259.         (vm-display-startup-message)
  260.         (if (not (input-pending-p))
  261.         (message totals-blurb)))))))
  262.  
  263. ;;;###autoload
  264. (defun vm-other-frame (&optional folder read-only)
  265.   "Like vm, but run in a newly created frame."
  266.   (interactive (list nil current-prefix-arg))
  267.   (vm-session-initialization)
  268.   (if (vm-multiple-frames-possible-p)
  269.       (if folder
  270.       (vm-goto-new-frame 'folder)
  271.     (vm-goto-new-frame 'primary-folder 'folder)))
  272.   (let ((vm-frame-per-folder nil)
  273.     (vm-search-other-frames nil))
  274.     (vm folder read-only))
  275.   (if (vm-multiple-frames-possible-p)
  276.       (vm-set-hooks-for-frame-deletion)))
  277.  
  278. ;;;###autoload
  279. (defun vm-other-window (&optional folder read-only)
  280.   "Like vm, but run in a different window."
  281.   (interactive (list nil current-prefix-arg))
  282.   (vm-session-initialization)
  283.   (if (one-window-p t)
  284.       (split-window))
  285.   (other-window 1)
  286.   (let ((vm-frame-per-folder nil)
  287.     (vm-search-other-frames nil))
  288.     (vm folder read-only)))
  289.  
  290. (put 'vm-mode 'mode-class 'special)
  291.  
  292. ;;;###autoload
  293. (defun vm-mode (&optional read-only)
  294.   "Major mode for reading mail.
  295.  
  296. This is VM 6.43.
  297.  
  298. Commands:
  299.    h - summarize folder contents
  300.  C-t - toggle threads display
  301.  
  302.    n - go to next message
  303.    p - go to previous message
  304.    N - like `n' but ignores skip-variable settings
  305.    P - like `p' but ignores skip-variable settings
  306.  M-n - go to next unread message
  307.  M-p - go to previous unread message
  308.  RET - go to numbered message (uses prefix arg or prompts in minibuffer)
  309.  TAB - go to last message seen
  310.    ^ - go to parent of this message
  311.  M-s - incremental search through the folder
  312.  
  313.    t - display hidden headers
  314.  SPC - expose message body or scroll forward a page
  315.    b - scroll backward a page
  316.    < - go to beginning of current message
  317.    > - go to end of current message
  318.  
  319.    d - delete message, prefix arg deletes messages forward
  320.  C-d - delete message, prefix arg deletes messages backward
  321.    u - undelete
  322.    k - flag for deletion all messages with same subject as the current message
  323.  
  324.    r - reply (only to the sender of the message)
  325.    R - reply with included text from the current message
  326.  M-r - extract and resend bounced message
  327.    f - followup (reply to all recipients of message)
  328.    F - followup with included text from the current message
  329.    z - forward the current message
  330.    m - send a message
  331.    B - resend the current message to another user.
  332.    c - continue composing the most recent message you were composing
  333.  
  334.    @ - digestify and mail entire folder contents (the folder is not modified)
  335.    * - burst a digest into individual messages, and append and assimilate these
  336.        messages into the current folder.
  337.  
  338.    G - sort messages by various keys
  339.  
  340.    g - get any new mail that has arrived in the system mailbox
  341.        (new mail is appended to the disk and buffer copies of the
  342.        primary inbox.)
  343.    v - visit another mail folder
  344.  
  345.    e - edit the current message
  346.    j - discard cached information about the current message
  347.  
  348.    s - save current message in a folder (appends if folder already exists)
  349.    w - write current message to a file without its headers (appends if exists)
  350.    S - save entire folder to disk, does not expunge
  351.    A - save unfiled messages to their vm-auto-folder-alist specified folders
  352.    # - expunge deleted messages (without saving folder)
  353.    q - quit VM, deleted messages are not expunged, folder is
  354.        saved to disk if it is modified.  new messages are changed
  355.        to be flagged as just unread.
  356.    x - exit VM with no change to the folder
  357.  
  358.  M N - use marks; the next vm command will affect only marked messages
  359.        if it makes sense for the command to do so.  These commands
  360.        apply and remove marks to messages:
  361.  
  362.        M M - mark the current message
  363.        M U - unmark the current message
  364.        M m - mark all messages
  365.        M u - unmark all messages
  366.        M C - mark messages matched by a virtual folder selector
  367.        M c - unmark messages matched by a virtual folder selector
  368.        M T - mark thread tree rooted at the current message
  369.        M t - unmark thread tree rooted at the current message
  370.        M S - mark messages with the same subject as the current message
  371.        M s - unmark messages with the same subject as the current message
  372.        M A - mark messages with the same author as the current message
  373.        M a - unmark messages with the same author as the current message
  374.        M R - mark messages within the point/mark region in the summary
  375.        M r - unmark messages within the point/mark region in the summary
  376.        M V - toggle the marked-ness of all messages
  377.  
  378.        M ? - partial help for mark commands
  379.  
  380.  W S - save the current window configuration to a name
  381.  W D - delete a window configuration
  382.  W W - apply a configuration
  383.  W ? - help for the window configuration commands
  384.  
  385.  V V - visit a virtual folder (must be defined in vm-virtual-folder-alist)
  386.  V C - create a virtual folder composed of a subset of the
  387.        current folder's messages.
  388.  V A - create a virtual folder containing all the messages in the current
  389.        folder with the same author as the current message.
  390.  V S - create a virtual folder containing all the messages in the current
  391.        folder with the same subject as the current message.
  392.  V X - apply the selectors of a named virtual folder to the
  393.        messages in the current folder and create a virtual folder
  394.        containing the selected messages.
  395.  V M - toggle whether this virtual folder's messages mirror the
  396.        underlying real messages' attributes.
  397.  V ? - help for virtual folder commands
  398.  
  399.  C-_ - undo, special undo that retracts the most recent
  400.              changes in message attributes and labels.  Expunges,
  401.              message edits, and saves cannot be undone.  C-x u is
  402.              also bound to this command.
  403.  
  404.    a - set message attributes
  405.  
  406.  l a - add labels to message
  407.  l d - delete labels from message
  408.  
  409.    L - reload your VM init file, ~/.vm
  410.  
  411.    % - change a folder to another type
  412.  
  413.    ? - help
  414.  
  415.    ! - run a shell command
  416.    | - run a shell command with the current message as input
  417.  
  418.  M-C - view conditions under which you may redistribute VM
  419.  M-W - view the details of VM's lack of a warranty
  420.  
  421. Use M-x vm-submit-bug-report to submit a bug report.
  422.  
  423. Variables:
  424.    vm-arrived-message-hook
  425.    vm-arrived-messages-hook
  426.    vm-auto-center-summary
  427.    vm-auto-decode-mime-messages
  428.    vm-auto-displayed-mime-content-types
  429.    vm-auto-folder-alist
  430.    vm-auto-folder-case-fold-search
  431.    vm-auto-get-new-mail
  432.    vm-auto-next-message
  433.    vm-berkeley-mail-compatibility
  434.    vm-burst-digest-messages-inherit-labels
  435.    vm-check-folder-types
  436.    vm-circular-folders
  437.    vm-confirm-new-folders
  438.    vm-confirm-quit
  439.    vm-convert-folder-types
  440.    vm-crash-box
  441.    vm-crash-box-suffix
  442.    vm-default-folder-type
  443.    vm-delete-after-archiving
  444.    vm-delete-after-bursting
  445.    vm-delete-after-saving
  446.    vm-delete-empty-folders
  447.    vm-digest-burst-type
  448.    vm-digest-center-preamble
  449.    vm-digest-preamble-format
  450.    vm-digest-send-type
  451.    vm-display-buffer-hook
  452.    vm-display-using-mime
  453.    vm-edit-message-hook
  454.    vm-folder-directory
  455.    vm-folder-read-only
  456.    vm-follow-summary-cursor
  457.    vm-forward-message-hook
  458.    vm-forwarded-headers
  459.    vm-forwarding-digest-type
  460.    vm-forwarding-subject-format
  461.    vm-frame-parameter-alist
  462.    vm-frame-per-completion
  463.    vm-frame-per-composition
  464.    vm-frame-per-edit
  465.    vm-frame-per-folder
  466.    vm-frame-per-help
  467.    vm-frame-per-summary
  468.    vm-highlighted-header-face
  469.    vm-highlighted-header-regexp
  470.    vm-honor-page-delimiters
  471.    vm-image-directory
  472.    vm-index-file-suffix
  473.    vm-in-reply-to-format
  474.    vm-included-text-attribution-format
  475.    vm-included-text-discard-header-regexp
  476.    vm-included-text-headers
  477.    vm-included-text-prefix
  478.    vm-invisible-header-regexp
  479.    vm-jump-to-new-messages
  480.    vm-jump-to-unread-messages
  481.    vm-keep-crash-boxes
  482.    vm-keep-sent-messages
  483.    vm-mail-check-interval
  484.    vm-mail-header-from
  485.    vm-mail-mode-hook
  486.    vm-make-crash-box-name
  487.    vm-make-spool-file-name
  488.    vm-mime-7bit-composition-charset
  489.    vm-mime-8bit-composition-charset
  490.    vm-mime-8bit-text-transfer-encoding
  491.    vm-mime-alternative-select-method
  492.    vm-mime-attachment-auto-type-alist
  493.    vm-mime-attachment-save-directory
  494.    vm-mime-avoid-folding-content-type
  495.    vm-mime-base64-decoder-program
  496.    vm-mime-base64-decoder-switches
  497.    vm-mime-base64-encoder-program
  498.    vm-mime-base64-encoder-switches
  499.    vm-mime-button-format-alist
  500.    vm-mime-button-face
  501.    vm-mime-charset-font-alist
  502.    vm-mime-default-face-charsets
  503.    vm-mime-digest-discard-header-regexp
  504.    vm-mime-digest-headers
  505.    vm-mime-display-function
  506.    vm-mime-external-content-types-alist
  507.    vm-mime-ignore-mime-version
  508.    vm-mime-internal-content-types
  509.    vm-mime-max-message-size
  510.    vm-mode-hook
  511.    vm-mosaic-program
  512.    vm-mosaic-program-switches
  513.    vm-move-after-deleting
  514.    vm-move-after-killing
  515.    vm-move-after-undeleting
  516.    vm-move-messages-physically
  517.    vm-mutable-frames
  518.    vm-mutable-windows
  519.    vm-netscape-program
  520.    vm-netscape-program-switches
  521.    vm-pop-auto-expunge-alist
  522.    vm-pop-bytes-per-session
  523.    vm-pop-expunge-after-retrieving
  524.    vm-pop-max-message-size
  525.    vm-pop-md5-program
  526.    vm-pop-messages-per-session
  527.    vm-popup-menu-on-mouse-3
  528.    vm-preferences-file
  529.    vm-preview-lines
  530.    vm-preview-read-messages
  531.    vm-primary-inbox
  532.    vm-quit-hook
  533.    vm-recognize-pop-maildrops
  534.    vm-reply-hook
  535.    vm-reply-ignored-addresses
  536.    vm-reply-ignored-reply-tos
  537.    vm-reply-subject-prefix
  538.    vm-resend-bounced-discard-header-regexp
  539.    vm-resend-bounced-headers
  540.    vm-resend-bounced-message-hook
  541.    vm-resend-discard-header-regexp
  542.    vm-resend-headers
  543.    vm-resend-message-hook
  544.    vm-retrieved-spooled-mail-hook
  545.    vm-rfc1153-digest-discard-header-regexp
  546.    vm-rfc1153-digest-headers
  547.    vm-rfc934-digest-discard-header-regexp
  548.    vm-rfc934-digest-headers
  549.    vm-search-using-regexps
  550.    vm-select-message-hook
  551.    vm-select-new-message-hook
  552.    vm-select-unread-message-hook
  553.    vm-send-digest-hook
  554.    vm-send-using-mime
  555.    vm-skip-deleted-messages
  556.    vm-skip-read-messages
  557.    vm-spool-file-suffixes
  558.    vm-spool-files
  559.    vm-startup-with-summary
  560.    vm-strip-reply-headers
  561.    vm-summary-arrow
  562.    vm-summary-format
  563.    vm-summary-highlight-face
  564.    vm-summary-mode-hook
  565.    vm-summary-redo-hook
  566.    vm-summary-show-threads
  567.    vm-summary-thread-indent-level
  568.    vm-tale-is-an-idiot
  569.    vm-temp-file-directory
  570.    vm-toolbar-pixmap-directory
  571.    vm-trust-From_-with-Content-Length
  572.    vm-undisplay-buffer-hook
  573.    vm-unforwarded-header-regexp
  574.    vm-url-browser
  575.    vm-url-search-limit
  576.    vm-use-menus
  577.    vm-use-toolbar
  578.    vm-virtual-folder-alist
  579.    vm-virtual-mirror
  580.    vm-visible-headers
  581.    vm-visit-folder-hook
  582.    vm-visit-when-saving
  583.    vm-warp-mouse-to-new-frame
  584.    vm-window-configuration-file
  585. "
  586.   (interactive "P")
  587.   (vm (current-buffer) read-only)
  588.   (vm-display nil nil '(vm-mode) '(vm-mode)))
  589.  
  590. ;;;###autoload
  591. (defun vm-visit-folder (folder &optional read-only)
  592.   "Visit a mail file.
  593. VM will parse and present its messages to you in the usual way.
  594.  
  595. First arg FOLDER specifies the mail file to visit.  When this
  596. command is called interactively the file name is read from the
  597. minibuffer.
  598.  
  599. Prefix arg or optional second arg READ-ONLY non-nil indicates
  600. that the folder should be considered read only.  No attribute
  601. changes, messages additions or deletions will be allowed in the
  602. visited folder."
  603.   (interactive
  604.    (save-excursion
  605.      (vm-session-initialization)
  606.      (vm-select-folder-buffer)
  607.      (let ((default-directory (if vm-folder-directory
  608.                   (expand-file-name vm-folder-directory)
  609.                 default-directory))
  610.        (default (or vm-last-visit-folder vm-last-save-folder))
  611.        (this-command this-command)
  612.        (last-command last-command))
  613.        (list (vm-read-file-name
  614.           (format "Visit%s folder:%s "
  615.               (if current-prefix-arg " read only" "")
  616.               (if default
  617.               (format " (default %s)" default)
  618.             ""))
  619.           default-directory default nil nil 'vm-folder-history)
  620.          current-prefix-arg))))
  621.   (vm-session-initialization)
  622.   (vm-select-folder-buffer)
  623.   (vm-check-for-killed-summary)
  624.   (setq vm-last-visit-folder folder)
  625.   (let ((default-directory (or vm-folder-directory default-directory)))
  626.     (setq folder (expand-file-name folder)))
  627.   (vm folder read-only))
  628.  
  629. ;;;###autoload
  630. (defun vm-visit-folder-other-frame (folder &optional read-only)
  631.   "Like vm-visit-folder, but run in a newly created frame."
  632.   (interactive
  633.    (save-excursion
  634.      (vm-session-initialization)
  635.      (vm-select-folder-buffer)
  636.      (let ((default-directory (if vm-folder-directory
  637.                   (expand-file-name vm-folder-directory)
  638.                 default-directory))
  639.        (default (or vm-last-visit-folder vm-last-save-folder))
  640.        (this-command this-command)
  641.        (last-command last-command))
  642.        (list (vm-read-file-name
  643.           (format "Visit%s folder in other frame:%s "
  644.               (if current-prefix-arg " read only" "")
  645.               (if default
  646.               (format " (default %s)" default)
  647.             ""))
  648.           default-directory default nil nil 'vm-folder-history)
  649.          current-prefix-arg))))
  650.   (if (vm-multiple-frames-possible-p)
  651.       (vm-goto-new-frame 'folder))
  652.   (let ((vm-frame-per-folder nil)
  653.     (vm-search-other-frames nil))
  654.     (vm-visit-folder folder read-only))
  655.   (if (vm-multiple-frames-possible-p)
  656.       (vm-set-hooks-for-frame-deletion)))
  657.  
  658. ;;;###autoload
  659. (defun vm-visit-folder-other-window (folder &optional read-only)
  660.   "Like vm-visit-folder, but run in a different window."
  661.   (interactive
  662.    (save-excursion
  663.      (vm-session-initialization)
  664.      (vm-select-folder-buffer)
  665.      (let ((default-directory (if vm-folder-directory
  666.                   (expand-file-name vm-folder-directory)
  667.                 default-directory))
  668.        (default (or vm-last-visit-folder vm-last-save-folder))
  669.        (this-command this-command)
  670.        (last-command last-command))
  671.        (list (vm-read-file-name
  672.           (format "Visit%s folder in other window:%s "
  673.               (if current-prefix-arg " read only" "")
  674.               (if default
  675.               (format " (default %s)" default)
  676.             ""))
  677.           default-directory default nil nil 'vm-folder-history)
  678.          current-prefix-arg))))
  679.   (vm-session-initialization)
  680.   (if (one-window-p t)
  681.       (split-window))
  682.   (other-window 1)
  683.   (let ((vm-frame-per-folder nil)
  684.     (vm-search-other-frames nil))
  685.     (vm-visit-folder folder read-only)))
  686.  
  687. (put 'vm-virtual-mode 'mode-class 'special)
  688.  
  689. (defun vm-virtual-mode (&rest ignored)
  690.   "Mode for reading multiple mail folders as one folder.
  691.  
  692. The commands available are the same commands that are found in
  693. vm-mode, except that a few of them are not applicable to virtual
  694. folders.
  695.  
  696. vm-virtual-mode is not a normal major mode.  If you run it, it
  697. will not do anything.  The entry point to vm-virtual-mode is
  698. vm-visit-virtual-folder.")
  699.  
  700. (defvar scroll-in-place)
  701.  
  702. ;;;###autoload
  703. (defun vm-visit-virtual-folder (folder-name &optional read-only)
  704.   (interactive
  705.    (let ((last-command last-command)
  706.      (this-command this-command))
  707.      (vm-session-initialization)
  708.      (list
  709.       (vm-read-string "Visit virtual folder: " vm-virtual-folder-alist)
  710.       current-prefix-arg)))
  711.   (vm-session-initialization)
  712.   (if (not (assoc folder-name vm-virtual-folder-alist))
  713.       (error "No such virtual folder, %s" folder-name))
  714.   (let ((buffer-name (concat "(" folder-name ")"))
  715.     first-time blurb)
  716.     (set-buffer (get-buffer-create buffer-name))
  717.     (setq first-time (not (eq major-mode 'vm-virtual-mode)))
  718.     (if first-time
  719.     (progn
  720.       (if (fboundp 'buffer-disable-undo)
  721.           (buffer-disable-undo (current-buffer))
  722.         ;; obfuscation to make the v19 compiler not whine
  723.         ;; about obsolete functions.
  724.         (let ((x 'buffer-flush-undo))
  725.           (funcall x (current-buffer))))
  726.       (abbrev-mode 0)
  727.       (auto-fill-mode 0)
  728.       (setq mode-name "VM Virtual"
  729.         mode-line-format vm-mode-line-format
  730.         buffer-read-only t
  731.         vm-folder-read-only read-only
  732.         vm-label-obarray (make-vector 29 0)
  733.         vm-virtual-folder-definition
  734.           (assoc folder-name vm-virtual-folder-alist))
  735.       ;; scroll in place messes with scroll-up and this loses
  736.       (make-local-variable 'scroll-in-place)
  737.       (setq scroll-in-place nil)
  738.       (vm-build-virtual-message-list nil)
  739.       (use-local-map vm-mode-map)
  740.       (and (vm-menu-support-possible-p)
  741.            (vm-menu-install-menus))
  742.       (add-hook 'kill-buffer-hook 'vm-garbage-collect-folder)
  743.       (add-hook 'kill-buffer-hook 'vm-garbage-collect-message)
  744.       ;; save this for last in case the user interrupts.
  745.       ;; an interrupt anywhere before this point will cause
  746.       ;; everything to be redone next revisit.
  747.       (setq major-mode 'vm-virtual-mode)
  748.       (run-hooks 'vm-virtual-mode-hook)
  749.       ;; must come after the setting of major-mode
  750.       (setq mode-popup-menu (and vm-use-menus vm-popup-menu-on-mouse-3
  751.                      (vm-menu-support-possible-p)
  752.                      (vm-menu-mode-menu)))
  753.       (setq blurb (vm-emit-totals-blurb))
  754.       (if vm-summary-show-threads
  755.           (vm-sort-messages "thread"))
  756.       (if (vm-thoughtfully-select-message)
  757.           (vm-preview-current-message)
  758.         (vm-update-summary-and-mode-line))
  759.       (message blurb)))
  760.     ;; make a new frame if the user wants one.  reuse an
  761.     ;; existing frame that is showing this folder.
  762.     (vm-goto-new-folder-frame-maybe 'folder)
  763.     (if vm-raise-frame-at-startup
  764.     (vm-raise-frame))
  765.     (vm-display nil nil (list this-command) (list this-command 'startup))
  766.     (and (vm-toolbar-support-possible-p) vm-use-toolbar
  767.      (vm-toolbar-install-toolbar))
  768.     (if first-time
  769.     (progn
  770.       (if (vm-should-generate-summary)
  771.           (progn (vm-summarize t nil)
  772.              (message blurb)))
  773.       ;; raise the summary frame if the user wants frames
  774.       ;; raised and if there is a summary frame.
  775.       (if (and vm-summary-buffer
  776.            vm-mutable-frames
  777.            vm-frame-per-summary
  778.            vm-raise-frame-at-startup)
  779.           (vm-raise-frame))
  780.       ;; if vm-mutable-windows is nil, the startup
  781.       ;; configuration can't be applied, so do
  782.       ;; something to get a VM buffer on the screen
  783.       (if vm-mutable-windows
  784.           (vm-display nil nil (list this-command)
  785.               (list (or this-command 'vm) 'startup))
  786.         (save-excursion
  787.           (switch-to-buffer (or vm-summary-buffer
  788.                     vm-presentation-buffer
  789.                     (current-buffer)))))))
  790.  
  791.     ;; check interactive-p so as not to bog the user down if they
  792.     ;; run this function from within another function.
  793.     (and (interactive-p)
  794.      (not vm-startup-message-displayed)
  795.      (vm-display-startup-message)
  796.      (message blurb))))
  797.  
  798. ;;;###autoload
  799. (defun vm-visit-virtual-folder-other-frame (folder-name &optional read-only)
  800.   "Like vm-visit-virtual-folder, but run in a newly created frame."
  801.   (interactive
  802.    (let ((last-command last-command)
  803.      (this-command this-command))
  804.      (vm-session-initialization)
  805.      (list
  806.       (vm-read-string "Visit virtual folder in other frame: "
  807.                vm-virtual-folder-alist)
  808.       current-prefix-arg)))
  809.   (vm-session-initialization)
  810.   (if (vm-multiple-frames-possible-p)
  811.       (vm-goto-new-frame 'folder))
  812.   (let ((vm-frame-per-folder nil)
  813.     (vm-search-other-frames nil))
  814.     (vm-visit-virtual-folder folder-name read-only))
  815.   (if (vm-multiple-frames-possible-p)
  816.       (vm-set-hooks-for-frame-deletion)))
  817.  
  818. ;;;###autoload
  819. (defun vm-visit-virtual-folder-other-window (folder-name &optional read-only)
  820.   "Like vm-visit-virtual-folder, but run in a different window."
  821.   (interactive
  822.    (let ((last-command last-command)
  823.      (this-command this-command))
  824.      (vm-session-initialization)
  825.      (list
  826.       (vm-read-string "Visit virtual folder in other window: "
  827.                vm-virtual-folder-alist)
  828.       current-prefix-arg)))
  829.   (vm-session-initialization)
  830.   (if (one-window-p t)
  831.       (split-window))
  832.   (other-window 1)
  833.   (let ((vm-frame-per-folder nil)
  834.     (vm-search-other-frames nil))
  835.     (vm-visit-virtual-folder folder-name read-only)))
  836.  
  837. ;;;###autoload
  838. (defun vm-mail (&optional to)
  839.   "Send a mail message from within VM, or from without.
  840. Optional argument TO is a string that should contain a comma separated
  841. recipient list."
  842.   (interactive)
  843.   (vm-session-initialization)
  844.   (vm-select-folder-buffer)
  845.   (vm-check-for-killed-summary)
  846.   (vm-mail-internal nil to)
  847.   (run-hooks 'vm-mail-hook)
  848.   (run-hooks 'vm-mail-mode-hook))
  849.  
  850. ;;;###autoload
  851. (defun vm-mail-other-frame (&optional to)
  852.   "Like vm-mail, but run in a newly created frame.
  853. Optional argument TO is a string that should contain a comma separated
  854. recipient list."
  855.   (interactive)
  856.   (vm-session-initialization)
  857.   (if (vm-multiple-frames-possible-p)
  858.       (vm-goto-new-frame 'composition))
  859.   (let ((vm-frame-per-composition nil)
  860.     (vm-search-other-frames nil))
  861.     (vm-mail to))
  862.   (if (vm-multiple-frames-possible-p)
  863.       (vm-set-hooks-for-frame-deletion)))
  864.  
  865. ;;;###autoload
  866. (defun vm-mail-other-window (&optional to)
  867.   "Like vm-mail, but run in a different window.
  868. Optional argument TO is a string that should contain a comma separated
  869. recipient list."
  870.   (interactive)
  871.   (vm-session-initialization)
  872.   (if (one-window-p t)
  873.       (split-window))
  874.   (other-window 1)
  875.   (let ((vm-frame-per-composition nil)
  876.     (vm-search-other-frames nil))
  877.     (vm-mail to)))
  878.  
  879. ;;;###autoload
  880. (defun vm-submit-bug-report ()
  881.   "Submit a bug report, with pertinent information to the VM bug list."
  882.   (interactive)
  883.   (require 'reporter)
  884.   ;; make sure the user doesn't try to use vm-mail here.
  885.   (let ((reporter-mailer '(mail)))
  886.     (delete-other-windows)
  887.     (reporter-submit-bug-report
  888.      vm-maintainer-address
  889.      (concat "VM " vm-version)
  890.      (list
  891.       'vm-arrived-message-hook
  892.       'vm-arrived-messages-hook
  893.       'vm-auto-center-summary
  894.       'vm-auto-decode-mime-messages
  895.       'vm-auto-displayed-mime-content-types
  896. ;; don't send this by default, might be personal stuff in here.
  897. ;;      'vm-auto-folder-alist
  898.       'vm-auto-folder-case-fold-search
  899.       'vm-auto-get-new-mail
  900.       'vm-auto-next-message
  901.       'vm-berkeley-mail-compatibility
  902.       'vm-check-folder-types
  903.       'vm-circular-folders
  904.       'vm-confirm-new-folders
  905.       'vm-confirm-quit
  906.       'vm-convert-folder-types
  907.       'vm-crash-box
  908.       'vm-crash-box-suffix
  909.       'vm-default-folder-type
  910.       'vm-delete-after-archiving
  911.       'vm-delete-after-bursting
  912.       'vm-delete-after-saving
  913.       'vm-delete-empty-folders
  914.       'vm-digest-burst-type
  915.       'vm-digest-identifier-header-format
  916.       'vm-digest-center-preamble
  917.       'vm-digest-preamble-format
  918.       'vm-digest-send-type
  919.       'vm-display-buffer-hook
  920.       'vm-display-using-mime
  921.       'vm-edit-message-hook
  922.       'vm-edit-message-mode
  923.       'vm-flush-interval
  924.       'vm-folder-directory
  925.       'vm-folder-read-only
  926.       'vm-follow-summary-cursor
  927.       'vm-forward-message-hook
  928.       'vm-forwarded-headers
  929.       'vm-forwarding-digest-type
  930.       'vm-forwarding-subject-format
  931.       'vm-frame-parameter-alist
  932.       'vm-frame-per-completion
  933.       'vm-frame-per-composition
  934.       'vm-frame-per-edit
  935.       'vm-frame-per-folder
  936.       'vm-frame-per-help
  937.       'vm-frame-per-summary
  938.       'vm-highlight-url-face
  939.       'vm-highlighted-header-regexp
  940.       'vm-honor-page-delimiters
  941.       'vm-image-directory
  942.       'vm-in-reply-to-format
  943.       'vm-included-text-attribution-format
  944.       'vm-included-text-discard-header-regexp
  945.       'vm-included-text-headers
  946.       'vm-included-text-prefix
  947.       'vm-index-file-suffix
  948.       'vm-init-file
  949.       'vm-invisible-header-regexp
  950.       'vm-jump-to-new-messages
  951.       'vm-jump-to-unread-messages
  952.       'vm-keep-crash-boxes
  953.       'vm-keep-sent-messages
  954.       'vm-mail-header-from
  955.       'vm-mail-hook
  956.       'vm-make-crash-box-name
  957.       'vm-make-spool-file-name
  958.       'vm-mail-check-interval
  959.       'vm-mail-mode-hook
  960.       'vm-mime-7bit-composition-charset
  961.       'vm-mime-8bit-composition-charset
  962.       'vm-mime-8bit-text-transfer-encoding
  963.       'vm-mime-alternative-select-method
  964.       'vm-mime-attachment-auto-type-alist
  965.       'vm-mime-attachment-save-directory
  966.       'vm-mime-avoid-folding-content-type
  967.       'vm-mime-base64-decoder-program
  968.       'vm-mime-base64-decoder-switches
  969.       'vm-mime-base64-encoder-program
  970.       'vm-mime-base64-encoder-switches
  971.       'vm-mime-button-format-alist
  972.       'vm-mime-button-face
  973.       'vm-mime-charset-font-alist
  974.       'vm-mime-default-face-charsets
  975.       'vm-mime-digest-discard-header-regexp
  976.       'vm-mime-digest-headers
  977.       'vm-mime-display-function
  978.       'vm-mime-external-content-types-alist
  979.       'vm-mime-ignore-mime-version
  980.       'vm-mime-internal-content-types
  981.       'vm-mime-max-message-size
  982.       'vm-mode-hook
  983.       'vm-mode-hooks
  984.       'vm-mosaic-program
  985.       'vm-mosaic-program-switches
  986.       'vm-move-after-deleting
  987.       'vm-move-after-undeleting
  988.       'vm-move-after-killing
  989.       'vm-move-messages-physically
  990.       'vm-movemail-program
  991.       'vm-mutable-frames
  992.       'vm-mutable-windows
  993.       'vm-netscape-program
  994.       'vm-netscape-program-switches
  995. ;; POP passwords might be listed here
  996. ;;      'vm-pop-auto-expunge-alist
  997.       'vm-pop-bytes-per-session
  998.       'vm-pop-expunge-after-retrieving
  999.       'vm-pop-max-message-size
  1000.       'vm-pop-messages-per-session
  1001.       'vm-pop-md5-program
  1002.       'vm-popup-menu-on-mouse-3
  1003.       'vm-preferences-file
  1004.       'vm-preview-lines
  1005.       'vm-preview-read-messages
  1006.       'vm-primary-inbox
  1007.       'vm-quit-hook
  1008.       'vm-recognize-pop-maildrops
  1009.       'vm-reply-hook
  1010. ;; don't feed the spammers or crackers
  1011. ;;      'vm-reply-ignored-addresses
  1012.       'vm-reply-ignored-reply-tos
  1013.       'vm-reply-subject-prefix
  1014.       'vm-resend-bounced-discard-header-regexp
  1015.       'vm-resend-bounced-headers
  1016.       'vm-resend-bounced-message-hook
  1017.       'vm-resend-discard-header-regexp
  1018.       'vm-resend-headers
  1019.       'vm-resend-message-hook
  1020.       'vm-retrieved-spooled-mail-hook
  1021.       'vm-rfc1153-digest-discard-header-regexp
  1022.       'vm-rfc1153-digest-headers
  1023.       'vm-rfc934-digest-discard-header-regexp
  1024.       'vm-rfc934-digest-headers
  1025.       'vm-search-using-regexps
  1026.       'vm-select-message-hook
  1027.       'vm-select-new-message-hook
  1028.       'vm-select-unread-message-hook
  1029.       'vm-send-digest-hook
  1030.       'vm-send-using-mime
  1031.       'vm-skip-deleted-messages
  1032.       'vm-skip-read-messages
  1033. ;; don't send vm-spool-files by default, might contain passwords
  1034. ;;      'vm-spool-files
  1035.       'vm-spool-file-suffixes
  1036.       'vm-startup-with-summary
  1037.       'vm-strip-reply-headers
  1038.       'vm-summary-format
  1039.       'vm-summary-highlight-face
  1040.       'vm-summary-mode-hook
  1041.       'vm-summary-mode-hooks
  1042.       'vm-summary-redo-hook
  1043.       'vm-summary-show-threads
  1044.       'vm-summary-thread-indent-level
  1045.       'vm-summary-uninteresting-senders
  1046.       'vm-summary-uninteresting-senders-arrow
  1047.       'vm-tale-is-an-idiot
  1048.       'vm-toolbar-pixmap-directory
  1049.       'vm-temp-file-directory
  1050.       'vm-trust-From_-with-Content-Length
  1051.       'vm-undisplay-buffer-hook
  1052.       'vm-unforwarded-header-regexp
  1053.       'vm-url-browser
  1054.       'vm-url-search-limit
  1055.       'vm-use-menus
  1056.       'vm-use-toolbar
  1057.       'vm-virtual-folder-alist
  1058.       'vm-virtual-mirror
  1059.       'vm-visible-headers
  1060.       'vm-visit-folder-hook
  1061.       'vm-visit-when-saving
  1062.       'vm-warp-mouse-to-new-frame
  1063.       'vm-window-configuration-file
  1064. ;; see what the user had loaded
  1065.       'features
  1066.       )
  1067.      nil
  1068.      nil
  1069.      "Please change the Subject header to a concise bug description.\nRemember to cover the basics, that is, what you expected to\nhappen and what in fact did happen.  Please remove these\ninstructions from your message.")
  1070.     (save-excursion
  1071.       (goto-char (point-min))
  1072.       (mail-position-on-field "Subject")
  1073.       (beginning-of-line)
  1074.       (delete-region (point) (progn (forward-line) (point)))
  1075.       (insert "Subject: VM " vm-version " induces a brain tumor in the user.\n         It is the tumor that creates the hallucinations.\n"))))
  1076.  
  1077. (defun vm-load-init-file (&optional interactive)
  1078.   (interactive "p")
  1079.   (if (or (not vm-init-file-loaded) interactive)
  1080.       (load vm-init-file (not interactive) (not interactive) t))
  1081.   (setq vm-init-file-loaded t)
  1082.   (vm-display nil nil '(vm-load-init-file) '(vm-load-init-file)))
  1083.  
  1084. (defun vm-check-emacs-version ()
  1085.   (cond ((and vm-xemacs-p
  1086.           (or (< emacs-major-version 19)
  1087.           (and (= emacs-major-version 19)
  1088.                (< emacs-minor-version 14))))
  1089.      (error "VM %s must be run on XEmacs 19.14 or a later version."
  1090.         vm-version))
  1091.     ((and vm-fsfemacs-p
  1092.           (or (< emacs-major-version 19)
  1093.           (and (= emacs-major-version 19)
  1094.                (< emacs-minor-version 34))))
  1095.      (error "VM %s must be run on Emacs 19.34 or a later v19 version."
  1096.         vm-version))
  1097.     ((and vm-fsfemacs-p (= emacs-major-version 20))
  1098.      (error "VM has not been ported to v20 Emacs.  Running VM in this environment is not advised."))))
  1099.  
  1100. (defun vm-set-debug-flags ()
  1101.   (or stack-trace-on-error
  1102.       debug-on-error
  1103.       (setq stack-trace-on-error
  1104.         '(
  1105.           wrong-type-argument
  1106.           wrong-number-of-arguments
  1107.           args-out-of-range
  1108.           void-function
  1109.           void-variable
  1110.           invalid-function
  1111.          ))))
  1112.  
  1113. (defun vm-session-initialization ()
  1114.   (require 'vm)
  1115.   (vm-note-emacs-version)
  1116.   (vm-check-emacs-version)
  1117. ;;  (vm-set-debug-flags)
  1118.   ;; If this is the first time VM has been run in this Emacs session,
  1119.   ;; do some necessary preparations.
  1120.   (if (or (not (boundp 'vm-session-beginning))
  1121.       vm-session-beginning)
  1122.       (progn
  1123.     (random t)
  1124.     (vm-load-init-file)
  1125.     (if (not vm-window-configuration-file)
  1126.         (setq vm-window-configurations vm-default-window-configuration)
  1127.       (or (vm-load-window-configurations vm-window-configuration-file)
  1128.           (setq vm-window-configurations vm-default-window-configuration)))
  1129.     (setq vm-buffers-needing-display-update (make-vector 29 0))
  1130.     ;; default value of vm-mime-button-face is 'gui-button-face
  1131.     ;; this face doesn't exist by default in FSF Emacs 19.34.
  1132.     ;; Create it.
  1133.     (and (fboundp 'make-face) (make-face 'gui-button-face))
  1134.     (and (vm-mouse-support-possible-p)
  1135.          (vm-mouse-install-mouse))
  1136.     (and (vm-menu-support-possible-p)
  1137.          vm-use-menus
  1138.          (vm-menu-fsfemacs-menus-p)
  1139.          (vm-menu-initialize-vm-mode-menu-map))
  1140.     (setq vm-session-beginning nil))))
  1141.  
  1142. (autoload 'reporter-submit-bug-report "reporter")
  1143. (autoload 'timezone-make-date-sortable "timezone")
  1144. (autoload 'rfc822-addresses "rfc822")
  1145. (autoload 'mail-strip-quoted-names "mail-utils")
  1146. (autoload 'mail-fetch-field "mail-utils")
  1147. (autoload 'mail-position-on-field "mail-utils")
  1148. (autoload 'mail-send "sendmail")
  1149. (autoload 'mail-mode "sendmail")
  1150. (autoload 'mail-extract-address-components "mail-extr")
  1151. (autoload 'set-tapestry "tapestry")
  1152. (autoload 'tapestry "tapestry")
  1153. (autoload 'tapestry-replace-tapestry-element "tapestry")
  1154. (autoload 'tapestry-nullify-tapestry-elements "tapestry")
  1155. (autoload 'tapestry-remove-frame-parameters "tapestry")
  1156. (autoload 'vm-easy-menu-define "vm-easymenu" nil 'macro)
  1157. (autoload 'vm-easy-menu-do-define "vm-easymenu")
  1158.